package com.neepu.serviceImpl;


import com.neepu.dao.IndexManagerMapper;
import com.neepu.dao.IndexTwoManagerMapper;
import com.neepu.pojo.Target;
import com.neepu.pojo.TwoTarget;
import com.neepu.service.IndexManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("IndexManagerService")
public class IndexManagerServiceImpl implements IndexManagerService {


    @Autowired
    private IndexManagerMapper indexManagerMapper;

    @Autowired
    private IndexTwoManagerMapper indexTowManagerMapper;

    @Override
    public List<Target> getAllTarget() {
        return indexManagerMapper.getAllTarget();
    }

    @Override
    public List<Target> findAllTargetByContent(String content) {
        return indexManagerMapper.findAllTargetByContent(content);
    }

    @Override
    public List<TwoTarget> findAllTwoTargetByContent(String content) {
        return indexTowManagerMapper.findAllTwoTargetByContent(content);
    }

    @Override
    public List<TwoTarget> getAllTwoTarget() {
        return indexTowManagerMapper.getAllTwoTarget();
    }

    @Override
    public Target findTargetById(int oneId) {
        return indexManagerMapper.findTargetById(oneId);
    }

    @Override
    public void deleteOneTarget(Integer id) {
        indexManagerMapper.deleteOneTarget(id);
    }

    @Override
    public void deleteTwoTarget(Integer id) {
        indexTowManagerMapper.deleteTwoTarget(id);
    }

    @Override
    public void insertTarget(Target target) {
        indexManagerMapper.insertTarget(target);
    }

    @Override
    public void insertTwoTarget(TwoTarget twoTarget) {
        indexTowManagerMapper.insertTwoTarget(twoTarget);
    }

    @Override
    public TwoTarget findTwoTargetById(Integer id) {
        return indexTowManagerMapper.findTwoTargetById(id);
    }

    @Override
    public void updateTarget(Target target) {
        indexManagerMapper.updateTarget(target);
    }

    @Override
    public void updateTwoTarget(TwoTarget twoTarget) {
        indexTowManagerMapper.updateTwoTarget(twoTarget);
    }
}
